package com.sumover.POJO;

import java.io.Serializable;
import java.util.Date;

public class Article implements Serializable {
    private Integer articleid;

    private Integer publisherid;

    private User publisher;

    private Date lastmodifiedtime;

    private static final long serialVersionUID = 1L;

    public Integer getArticleid() {
        return articleid;
    }

    public void setArticleid(Integer articleid) {
        this.articleid = articleid;
    }

    public Integer getPublisherid() {
        return publisherid;
    }

    public void setPublisherid(Integer publisherid) {
        this.publisherid = publisherid;
    }

    public Date getLastmodifiedtime() {
        return lastmodifiedtime;
    }

    public void setLastmodifiedtime(Date lastmodifiedtime) {
        this.lastmodifiedtime = lastmodifiedtime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Article other = (Article) that;
        return (this.getArticleid() == null ? other.getArticleid() == null : this.getArticleid().equals(other.getArticleid()))
                && (this.getPublisherid() == null ? other.getPublisherid() == null : this.getPublisherid().equals(other.getPublisherid()))
                && (this.getLastmodifiedtime() == null ? other.getLastmodifiedtime() == null : this.getLastmodifiedtime().equals(other.getLastmodifiedtime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getArticleid() == null) ? 0 : getArticleid().hashCode());
        result = prime * result + ((getPublisherid() == null) ? 0 : getPublisherid().hashCode());
        result = prime * result + ((getLastmodifiedtime() == null) ? 0 : getLastmodifiedtime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", articleid=").append(articleid);
        sb.append(", publisherid=").append(publisherid);
        sb.append(", lastmodifiedtime=").append(lastmodifiedtime);
        sb.append("]");
        return sb.toString();
    }
}